const BASE_URL = "http://192.168.3.34:8082"
export const myRequset = (options) => {
	return new Promise((resolve, reject) => {
		uni.request({
			url: BASE_URL + options.url,
			method: options.method || 'get',
			data: options.data || {},
			success: (res) => {
				if (res.data.status !== 0) {
					return uni.showToast({
						title: "获取数据失败",
						icon: "error"
					})
				}
				resolve(res.data.message)
			},
			fail: (err) => {
				uni.showToast({
					title: err.errMsg,
					icon: "error"
				})
				reject(err)
			}
		})
	})
}